package com.cloudlead.plugin.security.entity;

import com.cloudlead.common.lang.persistence.AbstractIdEntity;

import com.cloudlead.common.persistence.UpdateCheck;

import javax.validation.constraints.Size;
import java.lang.Boolean;
import com.cloudlead.common.lang.annotation.Label;
import java.lang.String;
import javax.validation.constraints.NotNull;

/**
 * EScUser is a Querydsl bean type
 */
@Label("用户")
public class EScUser extends AbstractIdEntity<String> {

    private static final long serialVersionUID =107129476011243L;    
    @Label("默认使用的组")
    @Size(max=24)
    private String defaultGroup;

    @Label("邮箱地址")
    @Size(max=255)
    private String email;

    @NotNull(groups={UpdateCheck.class})
    @Label("编号")
    @Size(max=24)
    private String id;

    @NotNull
    @Label("是否锁定")
    private Boolean locked;

    @Label("手机号码")
    @Size(max=255)
    private String mobile;

    @NotNull
    @Label("密码")
    @Size(max=100)
    private String password;

    @Label("盐值")
    @Size(max=100)
    private String salt;

    @NotNull
    @Label("用户名")
    @Size(max=100)
    private String username;

    public String getDefaultGroup() {
        return defaultGroup;
    }

    public void setDefaultGroup(String defaultGroup) {
        this.defaultGroup = defaultGroup;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String toString() {
         return String.format("EScUser { defaultGroup : %s,email : %s,id : %s,locked : %s,mobile : %s,password : %s,salt : %s,username : %s }",defaultGroup,email,id,locked,mobile,password,salt,username);
    }

}

